
import { IsNotEmpty } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateVideoDto {

    @IsNotEmpty()
    @ApiProperty({ description: '标题' })
    title: string;

    @IsNotEmpty()
    @ApiProperty({ description: '海报地址' })
    poster: string;

    @ApiProperty({ description: '作者' })
    author: string;

    @ApiProperty({ description: '发布日期' })
    releaseDate: string;

    @ApiProperty({ description: '时长', required: false })
    duration: string;

    @ApiProperty({ description: '简介', required: false })
    label: string;

    @ApiProperty({ description: '简介', required: false })
    intro: string;

    @ApiProperty({ description: '总集数', required: false })
    totals: string;

    @ApiProperty({ description: '当前集数', required: false })
    current: string;

    @ApiProperty({ description: '更新周期', required: false })
    updatePeriod: string;

    @ApiProperty({ description: '播放状态 1 上映 2 下架', required: false })
    playStatus: number;
}

export class UpdateVideoDto {

    @IsNotEmpty()
    @ApiProperty({ description: '视频id' })
    id: string;

    @ApiProperty({ description: '标题' })
    title: string;

    @ApiProperty(   { description: '海报地址' })
    poster: string;

    @ApiProperty({ description: '作者' })
    author: string;

    @ApiProperty({ description: '发布日期' })
    releaseDate: string;

    @ApiProperty({ description: '时长', required: false })
    duration: string;

    @ApiProperty({ description: '简介', required: false })
    label: string;

    @ApiProperty({ description: '简介', required: false })
    intro: string;

    @ApiProperty({ description: '总集数', required: false })
    totals: string;

    @ApiProperty({ description: '当前集数', required: false })
    current: string;

    @ApiProperty({ description: '更新周期', required: false })
    updatePeriod: string;

    @ApiProperty({ description: '播放状态 1 上映 2 下架', required: false })
    playStatus: number;
}